Class SwitchPortImpl

All Implemented Interfaces:
IPCObject, Port, Process, SwitchPort

public class SwitchPortImpl extends PortImpl implements SwitchPort
Information provided by the PKI file:

    \class SwitchPort
    
    \brief SwitchPort handles and manipulates switch ports.
    
    \example network().getDevice("Switch0").getPort("FastEthernet0/1")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setAccessPort

      public void setAccessPort(boolean bAccessPort)
      Information provided by the PKI file:
      
          \brief Enables or disables switch mode access.
          
          \param bAccessPort, true to enable switch mode access, false to disable it.
          
              
      Specified by:
      setAccessPort in interface SwitchPort
      Parameters:
      bAccessPort - Takes in a parameter of bAccessPort
    • isAccessPort

      public boolean isAccessPort()
      Information provided by the PKI file:
      
          \brief Returns true if switch mode access is enabled, otherwise false.
          
          \return bool, true if switch mode access is enabled, otherwise false.
          
              
      Specified by:
      isAccessPort in interface SwitchPort
      Returns:
      boolean Returns a boolean
    • setAccessVlan

      public void setAccessVlan(int vlan)
      Information provided by the PKI file:
      
          \brief Sets the access VLAN.
          
          \param int, the VLAN number.
          
              
      Specified by:
      setAccessVlan in interface SwitchPort
      Parameters:
      vlan - Takes in a parameter of vlan
    • getAccessVlan

      public int getAccessVlan()
      Information provided by the PKI file:
      
          \brief Returns the access VLAN.
          
          \return int, the VLAN number.
          
              
      Specified by:
      getAccessVlan in interface SwitchPort
      Returns:
      int Returns a int
    • addTrunkVlans

      public void addTrunkVlans(int start, int end)
      Information provided by the PKI file:
      
          \brief Adds trunk VLANs.
          
          \param start, the first trunk VLAN number.
          \param end, the last trunk VLAN number.
          
              
      Specified by:
      addTrunkVlans in interface SwitchPort
      Parameters:
      start - Takes in a parameter of start
      end - Takes in a parameter of end
    • removeTrunkVlans

      public void removeTrunkVlans(int start, int end)
      Information provided by the PKI file:
      
          \brief Removes the specified trunk VLANs.
          
          \param start, the first trunk VLAN number.
          \param end, the last trunk VLAN number.
          
              
      Specified by:
      removeTrunkVlans in interface SwitchPort
      Parameters:
      start - Takes in a parameter of start
      end - Takes in a parameter of end
    • setCdpEnable

      public void setCdpEnable(boolean bCDPEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables CDP.
          
          \param bCDPEnable, true to enable CDP, false to disable it.
          
              
      Specified by:
      setCdpEnable in interface SwitchPort
      Parameters:
      bCDPEnable - Takes in a parameter of bCDPEnable
    • isCdpEnable

      public boolean isCdpEnable()
      Information provided by the PKI file:
      
          \brief Returns true if CDP is enabled, otherwise false.
          
          \return bool, true if CDP is enabled, otherwise false.
          
              
      Specified by:
      isCdpEnable in interface SwitchPort
      Returns:
      boolean Returns a boolean
    • setNativeVlanId

      public void setNativeVlanId(int vlanID)
      Information provided by the PKI file:
      
          \brief Sets the native VLAN ID.
          
          \param vlanID, the native VLAN number.
          
              
      Specified by:
      setNativeVlanId in interface SwitchPort
      Parameters:
      vlanID - Takes in a parameter of vlanID
    • getNativeVlanId

      public int getNativeVlanId()
      Information provided by the PKI file:
      
          \brief Returns the native VLAN ID.
          
          \return int, the native VLAN number.
          
              
      Specified by:
      getNativeVlanId in interface SwitchPort
      Returns:
      int Returns a int
    • setVoipVlanId

      public void setVoipVlanId(int vlanID)
      Information provided by the PKI file:
      
          \brief Sets the VOIP VLAN ID.
          
          \param vlanID, the VOIP VLAN number.
          
              
      Specified by:
      setVoipVlanId in interface SwitchPort
      Parameters:
      vlanID - Takes in a parameter of vlanID
    • getVoipVlanId

      public int getVoipVlanId()
      Information provided by the PKI file:
      
          \brief Returns the VOIP VLAN ID.
          
          \return int, the VOIP VLAN number.
          
              
      Specified by:
      getVoipVlanId in interface SwitchPort
      Returns:
      int Returns a int
    • setNonegotiateFlag

      public void setNonegotiateFlag(boolean bFlag)
      Information provided by the PKI file:
      
          \brief Enables or disables nonnegotiate.
          
          \param bFlag, true to enable nonnegotiate, false to disable it.
          
              
      Specified by:
      setNonegotiateFlag in interface SwitchPort
      Parameters:
      bFlag - Takes in a parameter of bFlag
    • isNonegotiate

      public boolean isNonegotiate()
      Information provided by the PKI file:
      
          \brief Returns true if this nonnegotiate is enabled, otherwise false.
          
          \return bool, true if this nonnegotiate is enabled, otherwise false.
          
              
      Specified by:
      isNonegotiate in interface SwitchPort
      Returns:
      boolean Returns a boolean
    • setAdminOpMode

      public void setAdminOpMode(SwitchPortMode type)
      Information provided by the PKI file:
      
          \brief Sets the admin op port mode.
          
          \param type,        the port mode.
          Port modes: eAdminDynamicDesirable = 0,
          eAdminDynamicAuto = 1,
          eAdminOperationTrunk = 2,
          eAdminOperationAccess = 3
          
              
      Specified by:
      setAdminOpMode in interface SwitchPort
      Parameters:
      type - Takes in a parameter of type
    • getAdminOpMode

      public int getAdminOpMode()
      Information provided by the PKI file:
      
          \brief Returns the admin op port mode.
          
          \return int,        the port mode.
          Port modes: eAdminDynamicDesirable = 0,
          eAdminDynamicAuto = 1,
          eAdminOperationTrunk = 2,
          eAdminOperationAccess = 3
          
              
      Specified by:
      getAdminOpMode in interface SwitchPort
      Returns:
      int Returns a int
    • isAdminModeSet

      public boolean isAdminModeSet()
      Information provided by the PKI file:
      
          \brief Returns true if admin op port mode is set, otherwise false.
          
          \return bool, true if admin op port mode is set, otherwise false.
          
              
      Specified by:
      isAdminModeSet in interface SwitchPort
      Returns:
      boolean Returns a boolean
    • getPortSecurity

      public PortSecurity getPortSecurity()
      Information provided by the PKI file:
      
          \brief Returns the port security.
          
          \return PortSecurity, the PortSecurity object.
          
              
      Specified by:
      getPortSecurity in interface SwitchPort
      Returns:
      PortSecurity Returns a PortSecurity